package com.platform.module.common.redis;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import java.util.List;

@Data
@ToString
@EqualsAndHashCode
@Configuration
@ConfigurationProperties(prefix = "redis")
public class RedisProperties {

    private String database;

    private String host;

    private String port;

    private String password;

    private String poolMaxActive;

    private String poolMaxWait;

    private String poolMaxIdle;

    private String poolMinIdle;

    private String timeout;

    private String testOnBorrow;

    private List<String> nodes;

    private String maxAttempts;

    public void setDatabase(String database) {
        this.database = database;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public void setPort(String port) {
        this.port = port;
    }

    public void setPoolMaxActive(String poolMaxActive) {
        this.poolMaxActive = poolMaxActive;
    }

    public void setPoolMaxWait(String poolMaxWait) {
        this.poolMaxWait = poolMaxWait;
    }

    public void setPoolMaxIdle(String poolMaxIdle) {
        this.poolMaxIdle = poolMaxIdle;
    }

    public void setPoolMinIdle(String poolMinIdle) {
        this.poolMinIdle = poolMinIdle;
    }

    public void setTimeout(String timeout) {
        this.timeout = timeout;
    }

    public void setTestOnBorrow(String testOnBorrow) {
        this.testOnBorrow = testOnBorrow;
    }

    public void setNodes(List<String> nodes) {
        this.nodes = nodes;
    }

    public void setMaxAttempts(String maxAttempts) {
        this.maxAttempts = maxAttempts;
    }


    public String getDatabase() {
        return this.database;
    }

    public String getHost() {
        return this.host;
    }

    public String getPort() {
        return this.port;
    }

    public String getPoolMaxActive() {
        return this.poolMaxActive;
    }

    public String getPoolMaxWait() {
        return this.poolMaxWait;
    }

    public String getPoolMaxIdle() {
        return this.poolMaxIdle;
    }

    public String getPoolMinIdle() {
        return this.poolMinIdle;
    }

    public String getTimeout() {
        return this.timeout;
    }

    public String getTestOnBorrow() {
        return this.testOnBorrow;
    }

    public List<String> getNodes() {
        return this.nodes;
    }

    public String getMaxAttempts() {
        return this.maxAttempts;
    }
}
